package com.traxex.listener;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.nutz.ioc.annotation.InjectName;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

import com.traxex.dao.ManagerDao;
import com.traxex.modal.Manager;
import com.traxex.thread.CodeMapThread;
import com.traxex.util.CodeMapUtil;

@IocBean
@InjectName
public class CodeMapListener extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8557904954478863310L;
	@Override
	public void init() throws ServletException {
		super.init();
		/*ScheduledThreadPoolExecutor exe =(ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(1);
		exe.scheduleAtFixedRate(new CodeMapThread(), 0, 15, TimeUnit.SECONDS);*/
		CodeMapUtil.refreshMap();
	}
	
	
}
